home *** CD-ROM | disk | FTP | other *** search
/ Amiga Collections: Taifun / Taifun 136 (1990-05-15)(Ossowski, Stefan)(DE)(PD).zip / Taifun 136 (1990-05-15)(Ossowski, Stefan)(DE)(PD).adf / ScreenZap / ScreenZap.Docs < prev    next >
Text File  |  1990-02-23  |  8KB  |  157 lines

  1.  
  2.                     About ScreenZap Version 2.3
  3.  
  4.                                 or
  5.  
  6.                How to survive when your screen goes awry...
  7.  
  8.  
  9.  
  10.    WARNING:
  11.  
  12.    As this program kills things without asking permission from  anybody,  it
  13. should  only  be  used  when  there  is nothing to lose.  Get your pictures,
  14. source codes, texts, databases, money and who knows what else  saved  before
  15. you try anything like this. When there is nothing to lose, go ahead. Most of
  16. the  time,  it cleans up nicely, avoiding a reboot for some time. But do not
  17. be surprised when it goes GURU, as a system with screens and windows on  the
  18. loose is unstable in itself.
  19.  
  20.  
  21.    Short History:
  22.  
  23.    ScreenZap is possibly the most guru-aktive program  that  works.  It  was
  24. cooked  up  a  year  ago,  when  my  memory  became filled with screens from
  25. programs I had ^C'ed out of. As I didn't want to reboot too  often,  and  no
  26. other  program  I'd  heard  of could help me, I made a simple hack to kill a
  27. screen.  Later it was cleaned up, made to take single windows  and  multiple
  28. screens,  and  began  using CloseWindowSafely, and now this version is about
  29. the safest code of this type I can make.
  30.  
  31.  
  32.    How ScreenZap Works (when it does:-)
  33.  
  34.    ScreenZap is made to  kill  screens  and  windows  left  over  by  ^C'ed,
  35. debugged  or  otherwise dead programs.  When killing, it Forbid()s away from
  36. the multitasking system to avoid an even messier death. Then it looks in the
  37. IntutionBase to find otherwise disappeared screens/windows, and  kills  them
  38. off  in  the  correct  order  (buttom-up),   using   CloseWindowSafely   and
  39. CloseScreen. It will never try to close the WorkBench.
  40.  
  41.  
  42.    How To Use ScreenZap:
  43.  
  44.    When a screen/window goes undead, i.e. only Intuition knows about it,  it
  45. is  a  very  dangerous thing. As they may not have all the memory they think
  46. they have, the killing should be handled with care. When you  have  such  an
  47. undead  screen/window, try to touch as little as possible.  Get WorkBench up
  48. front with LeftAmiga-N and work  from  there.   If  the  window  is  on  the
  49. WorkBench screen, ScreenZap should be to-backed just before you try and kill
  50. the window.
  51.    If there are other screens you'd like to keep, as they  may  still  live,
  52. either  get those in front of the WorkBench and kill only those left behind,
  53. or get the undeads in front and kill them one at a time.
  54.    Use the method that involves the least touching, as  even  an  activation
  55. may cause a crash.
  56.    To run ScreenZap, either doubleclick its icon or call it from CLI with:
  57.  
  58.    1 DH0:-> ScreenZap
  59.  
  60.    ScreenZap takes no arguments whatsoever.
  61.  
  62.    A window will now appear with 4 gadgets. The first three of them are  for
  63. zapping  screens, the last for windows.
  64.    "Kill  Screens Behind WorkBench" will try to remove all the screens lying
  65. behind the WorkBench,  also  the  MandelVroom  you  were  running  at  lower
  66. priority  while  working,  which  will bomb you out from under your bed.  So
  67. again, know just what you shoot.
  68.    "Kill Screens Except WorkBench" does the same, but also on the screens in
  69. front of WorkBench.
  70.    "Kill Front Screen" will kill only one screen, the one in front,  and  it
  71. will  not  try to close WorkBenchScreen. This is the safest of the three, as
  72. you can see what you close. After zapping screens, the title bar  will  show
  73. how  many  screens and window were removed. ScreenZap will then be ready for
  74. yet another zapping.
  75.    "Kill Front Window On  Front  Screen"  will  close  the  foremost  window
  76. regardless  of  what's  going  on  in  it.   If  the  window to be closed is
  77. ScreenZap's own, it will ask for confirmation. If you  then  press  anything
  78. but  the  closegadget,  it  lives  on.   Otherwise, it closes peacefully.  A
  79. SuperBitMap will NOT be deallocated, as others may still be  using  it.   In
  80. the  case  of  a shared messageport, ScreenZap now uses CloseWindowSafely to
  81. avoid an unpleasent meeting with a guy from India.
  82.  
  83.    Now click on the appropriate gadget and watch either the undead  go  away
  84. or  the  machine go very dead. You may, of course, kill as many times as you
  85. dare and got undeads to kill.   After  this  bloody  mess,  exit  gracefully
  86. through the CloseGadget, and pray there isn't a ticking bomb in the system.
  87.    You may sometimes want to kill  a  screen/window  whose  maker  is  still
  88. alive,  but  for example caught in a never ending loop, waiting for anything
  89. BUT a window report. This will be done as readily as any other screens,  but
  90. be  ABSOLUTELY  sure  the  program  will  never  again even try to touch the
  91. window, or you will experience the FIREWORKS_DISPLAY mode! It would be better
  92. to use a program like AbortCommand to stop the program first.
  93.  
  94.  
  95.    Some Typical Ways To Die Are:
  96.  
  97.    If a window or screen is zapped, and a program tries to use it,  it  will
  98. find  garbage  instead of pointers, and try to use it. It is probably one of
  99. the simplest ways of making a total system crash, it seldom even GURU'es.  I
  100. tried  avoiding  this  in  the  start  by  sending  the window in question a
  101. CLOSEWINDOW message, but as it created more poblems  than  it  solved,  I've
  102. removed  it. It is now up to the user to ENSURE that no program will try and
  103. access it.
  104.    Having a window/screen whose titletext has changed, the program  suddenly
  105. stops  without  closing  it.   The  Title  now lies somewhere in newly freed
  106. memory, and other programs may get that. I've even seen one  of  ScreenZap's
  107. gadget texts in an undead window I was careless enough to  activate  (boom).
  108. You  can  typically  see this if ScreenZap's own title disappears or becomes
  109. garbage.
  110.    SuperBitMaps poses a problem, as they fill up memory without being closed
  111. by CloseWindowSafely.  This may be the only thing I will  add  to  ScreenZap
  112. later on.
  113.    Shared IDCMP ports should be closed safely with CloseWindowSafely(),  but
  114. in  this  state, noone knows. I can't even debug it, as the Forbid() clashes
  115. horribly with the debugger.
  116.    Sometimes, it seems,  a  window  will  just  disappear  from  Intuition's
  117. knowledge  without  erasing  the display. Trying to kill such a ghost window
  118. will propably go back and hit ScreenZap, who in turn will ask if  it  really
  119. must  close. In this case, don't close, go on to killing the screen, and you
  120. might still survive.
  121.  
  122.  
  123.    Recompiling:
  124.  
  125.    Recompiling ScreenZap is easy, just
  126.  
  127.    1> cc ScreenZap
  128.    1> ln ScreenZap.o c.lib
  129.  
  130.    It compiles easily under Manx V3.6, I know not whither Lattice can manage
  131. it, but it should. And it does (comes Big Brother in).
  132.  
  133.  
  134.    Disclaimer, Notes And All That Stuff:
  135.  
  136.    I am in no way  responsible  for  any  damage  done  to  your  system  by
  137. ScreenZap.   This  is  the  final warning: If you think it is too dangerous,
  138. reboot. It's better to wait a minute for a fresh boot than  a  month  for  a
  139. fresh Amiga.
  140.    You may distribute this program as you want, as long as
  141.       1) All the parts (ScreenZap, ScreenZap.c ScreenZap.doc & icons) are
  142.          distributed together.
  143.       2) I stand as the author of the program.
  144.       3) You don't take any money for the program itself. Inclusion in PD
  145.         collections is OK, as are electronic transfers.
  146.    Hack up the code to use in your own programs if you want to, but  if  you
  147. make any bugfixes/improvements, I'd like to hear about it.
  148.    I would be very interested if anyone made a better version,  for  example
  149. one that could kill tasks also (Kill on Fish 79 didn't work.)
  150.    If you really use this program much, send response, other  programs,  $$$
  151. or Amiga2500UX'es to
  152.                                        Lars R. Clausen
  153.                                        Hougårdsvej 29
  154.                                        8220 Brabrand
  155.                                        Denmark
  156.                                        FidoNet: 2:234/22.34
  157.